package com.itheima.edu.info.a;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class aaaa1 {
    public static void main(String[] args) {
        try {
            String s = "2018-03-04";
            DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
            LocalDate parse = LocalDate.parse(s, dtf);
            DateTimeFormatter Dtf = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
            String format = Dtf.format(parse);
            System.out.println(format);
        } catch (Exception e) {
            System.out.println("哈哈哈错了");
        }
        System.out.println("121");
    }
}
